package edu.uwosh.cs342.group1.storage;

import edu.uwosh.cs342.group1.database.StringEncryptor;

public class CloudUser {
	private String username;
	private String password;
	
	/**
	 * Adds a user with a username and password
	 * @param username
	 * @param password
	 */
	public CloudUser(String username, String password) {
		this.username = username;
		this.password = password;
	}
	
	/**
	 * Gets the username of the user
	 * @return
	 */
	public String getUsername() {
		return this.username;
	}
	
	/**
	 * Sets the username of the user
	 * @param username
	 */
	public void setUsername(String username) {
		this.username = username;
	}
	
	/**
	 * Gets the password of the user
	 * @return
	 */
	public String getPassword() {
		return this.password;
	}
	
	/**
	 * Sets the password of the user
	 * @param password
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	
	/**
	 * Encrypts the password
	 * @param password
	 * @return
	 */
	public static String EncryptPassword(String password) {
		return StringEncryptor.Encrypt(password);
	}
	
	/**
	 * Decrypts the password
	 * @param password
	 * @return
	 */
	public static String DecryptPassword(String password) {
		return StringEncryptor.Decrypt(password);
	}
}
